package com.rbac.infrastructure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rbac.domain.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    User getUserWithRoles(@Param("id") Long id);

    List<User> getUsersByRoleId(@Param("roleId") Long roleId);

    List<String> getUserPermissions(@Param("userId") Long userId);
}